package com.example.shixunandjavagotoyangchen.Eternity.LoginActivity;

import com.example.modelviewpresenter.Presenter.BasterPresenter;

import io.reactivex.Observer;
import io.reactivex.disposables.Disposable;

/**
 * 作者:二徒
 * 时间：2021/11/12- 11:25
 * 功能实现：
 */
public class LoginPresenter  extends BasterPresenter<LoginContion.loginview,LoginContion.loginmodel> {

    public LoginPresenter(LoginContion.loginview iew, LoginContion.loginmodel asd) {
        super(iew, asd);
    }

    public void dologin(String username,String password){
        asd.getloginmodel(username, password, new Observer<LoginBean>() {
            @Override
            public void onSubscribe(Disposable d) {

            }

            @Override
            public void onNext(LoginBean loginBean) {
                iew.getloginview(loginBean);
            }

            @Override
            public void onError(Throwable e) {

            }

            @Override
            public void onComplete() {

            }
        });
    }
}
